package com.example.feignclients;

import com.example.entity.Video;
import com.example.vo.VideoVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/*
 * @Author: hx
 * @CreateTime: 2022/3/7 15:00
 * @Description:
 * */
@FeignClient("API-VIDEOS")
public interface VideosClient {
    @PostMapping("/publish")
    Video publish(@RequestBody Video video);

    /**
     * 根据视频id查询视频的方法
     */
    @GetMapping("/getVideos")
    List<VideoVO> getVideos(@RequestParam("ids") List<Integer> ids);
}
